# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: François Charette <firmicus ατ gmx δοτ net>

pkgname=perl-html-scrubber
pkgver=0.19
pkgrel=3
pkgdesc="Perl extension for scrubbing/sanitizing html"
arch=('any')
url="https://search.cpan.org/dist/HTML-Scrubber"
license=('GPL' 'PerlArtistic')
depends=('perl>=5.10.0' 'perl-html-parser>=3')
makedepends=('perl-module-build')
options=('!emptydirs')
source=(https://cpan.metacpan.org/authors/id/N/NI/NIGELM/HTML-Scrubber-$pkgver.tar.gz)
sha256sums=('ae285578f8565f9154c63e4234704b57b6835f77a2f82ffe724899d453262bb1')

build() {
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL="--skipdeps" \
    PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='"$pkgdir"'" \
    PERL_MB_OPT="--installdirs vendor --destdir '"$pkgdir"'" \
    MODULEBUILDRC=/dev/null
  cd  "$srcdir"/HTML-Scrubber-$pkgver
  perl Makefile.PL
  make
}

package() {
  cd  "$srcdir"/HTML-Scrubber-$pkgver
  make install
}
